package knapsack;

import java.util.Comparator;

public class PackComparator implements Comparator<Pack> {

	@Override
	public int compare(Pack p1, Pack p2) {
		if (p1.getVolume() > p2.getVolume())
			return 1;
		else if (p1.getVolume() < p2.getVolume())
			return -1;
		else
			return 0;
	}

}
